package mqtt

import (
	mqttpaho "github.com/eclipse/paho.mqtt.golang"
)

var LocalSubHandlers []*SubHandler

var globalCloudSubHandlers = make([]*SubHandler, 0)

func CloudSubHandlers() []*SubHandler {
	return globalCloudSubHandlers
}

func AddCloudSubHandlers(subHandler *SubHandler) {
	globalCloudSubHandlers = append(globalCloudSubHandlers, subHandler)
}

type Subscribe interface {
	InitSubscribe()
}

type SubHandler struct {
	Topic      string
	Qos        byte
	MsgHandler mqttpaho.MessageHandler
}
